package com.ruoyi.web.controller.system;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.pojo.GetUserTaskPlanReq;
import com.ruoyi.common.pojo.QueryTaskPlanListReq;
import com.ruoyi.system.service.SysTaskPlanService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: zhangzhe
 * @Date: 2023/10/10
 */
@Api(tags = "1.3任务计划查询与统计")
@RestController
@RequestMapping("/system/taskplan")
public class QueryTaskPlanController {

    @Resource
    SysTaskPlanService sysTaskPlanService;

    @ApiOperation("1.3.1综合查询任务计划")
    @ApiOperationSupport(order = 1)
    @GetMapping("/searchTaskPlan")
    public AjaxResult queryTaskPlan(QueryTaskPlanListReq param) {
        return sysTaskPlanService.queryTaskPlan(param);
    }

    @ApiOperation("1.3.2查询我的任务计划")
    @ApiOperationSupport(order = 2)
    @GetMapping("/getMyTaskPlan")
    public AjaxResult getUserTaskPlan(GetUserTaskPlanReq param) {
        return sysTaskPlanService.getUserTaskPlan(param);
    }

    @ApiOperation("1.3.3查询任务计划详情")
    @ApiOperationSupport(order = 3)
    @GetMapping("/getTaskPlan")
    public AjaxResult getTaskPlan(Long id) {
        return sysTaskPlanService.getTaskPlan(id);
    }

}
